<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.ld.com/shield/tags" prefix="shield"%>
<%@ taglib uri="http://www.ld.com/jsp/plugin" prefix="plugin"%>
<%@ page trimDirectiveWhitespaces="true" %>
<fmt:setLocale value="zh_CN"/>
<shield:permssion type="button">
<form action="${ctxPathA}/oa/work/weeklyReport/addOrUpdate" method="post" autocomplete="off" class="show-info"    >
<div class="midtab">
	<a data-target="cg_thisWeek" onclick="thisWeek();" data-sign="this" class="cg_thisWeek current cur " href="javascript:void(0)" >本周周报</a><img src="${ctxPath }/images/icon/import.png" class="inited">&nbsp;&nbsp;&nbsp;
	<a data-target="cg_nextWeek" onclick="nextWeek();" data-sign="next" class="cg_nextWeek" href="javascript:void(0)" >下周计划</a>&nbsp;&nbsp;
</div>
	<shield:token/>
	<div class="table1">
	    <table class="tab-show">
	    <input id="id" name="id" type="hidden" maxlength="100" value="${model.id }">
	    	<colgroup>
	    		<col width="20%">
	    		<col width=""> 
	    	</colgroup>
			<tr>
				<th>
					<label><font color="red">*</font>标题：</label>
				</th>
	         	<td colspan="3"><input id="title" type="text" name="title" maxlength="50" class=" required" value="${model.title}"></td>
			</tr>
			<tr>
				<th>
					<label><font color="red">*</font>开始日期：</label>
				</th>
	         	<td><input type="text" id="startDate" name="startDate" value='<c:if test="${not empty model.id }"><fmt:formatDate value="${model.startDate }" pattern="yyyy-MM-dd"/></c:if><c:if test="${empty model.id }">${start }</c:if>' class="Wdate  required"></td>
	         	<th>
					<label><font color="red">*</font>结束日期：</label>
				</th>
	         	<td><input type="text" name="endDate" id="endDate" value='<c:if test="${not empty model.id }"><fmt:formatDate value="${model.endDate }" pattern="yyyy-MM-dd"/></c:if><c:if test="${empty model.id }">${end }</c:if>' class="Wdate  required"></td>
			</tr>
			<tr>
				<th>
					<label><font color="red">*</font>内容：</label>
				</th>
	         	<td colspan="3"><textarea id="ueditorContents" name="content" class="ueditor  required" style="width:99%;height:300px;" maxlength="400"><c:if test="${not empty model.content }">${model.content}</c:if>
	         	<c:if test="${empty model.content }">
	         	<table>
			        <tr>
						<td width="10" valign="top""word-break:break-all;">序号</td>				    
				        <td width="400" valign="top""word-break:break-all;">内容</td>
				        <td width="164" valign="top""word-break:break-all;">工时</td>
				        <td width="164" valign="top""word-break:break-all;">开始日期</td>
				        <td width="164" valign="top""word-break:break-all;">完成日期</td>
				        <td width="164" valign="top""word-break:break-all;">完成度</td>
			        </tr>
					<tr>
						<td>1</td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>					
						<td>%</td>
               		</tr>
               		<tr>
						<td>2</td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>					
						<td>%</td>
               		</tr>
				</table>
	         	</c:if>
	         	</textarea></td>
			</tr>
			<tr>
				<th>
					<label><font color="red">*</font>总工时：</label>
				</th>
	         	<td colspan="3"><input maxlength="4" type="text" id="totalHours" name="totalHours" class="number required " value="${model.totalHours}" style="display: inline;width: 20%">小时</td>
			</tr>
	    </table>
    </div>
    <div class="table2" style="display: none;">
	    <table class="tab-show">
	    	<colgroup>
	    		<col width="20%">
	    		<col width=""> 
	    	</colgroup>
			<tr>
				<th>
					<label><font color="red">*</font>标题：</label>
				</th>
	         	<td colspan="3"><input id="nextWeekTitle" type="text" name="nextWeekTitle" maxlength="50" class=" required" value="${model.nextWeekTitle}"></td>
			</tr>
			<tr>
				<th>
					<label><font color="red">*</font>开始日期：</label>
				</th>
	         	<td><input type="text" id="nextWeekStartDate" name="nextWeekStartDate" value='<c:if test="${not empty model.id }"><fmt:formatDate value="${model.nextWeekStartDate }" pattern="yyyy-MM-dd"/></c:if><c:if test="${empty model.id }">${nextStart }</c:if>' class="Wdate  required"></td>
	         	<th>
					<label><font color="red">*</font>结束日期：</label>
				</th>
	         	<td><input type="text" name="nextWeekEndDate" id="nextWeekEndDate" value='<c:if test="${not empty model.id }"><fmt:formatDate value="${model.nextWeekEndDate }" pattern="yyyy-MM-dd"/></c:if><c:if test="${empty model.id }">${nextEnd }</c:if>' class="Wdate  required"></td>
			</tr>
			<tr>
				<th>
					<label><font color="red">*</font>内容：</label>
				</th>
	         	<td colspan="3"><textarea id="ueditorContents1" name="nextWeekContent" class="ueditor  required" style="width:99%;height:300px;" maxlength="400"><c:if test="${not empty model.nextWeekContent }">${model.nextWeekContent}</c:if>
	         	<c:if test="${empty model.nextWeekContent }">
	         	<table>
			        <tr>
						<td width="10" valign="top""word-break:break-all;">序号</td>				    
				        <td width="400" valign="top""word-break:break-all;">内容</td>
				        <td width="164" valign="top""word-break:break-all;">工时</td>
				        <td width="164" valign="top""word-break:break-all;">开始日期</td>
				        <td width="164" valign="top""word-break:break-all;">完成日期</td>
				        <td width="164" valign="top""word-break:break-all;">完成度</td>
			        </tr>
					<tr>
						<td>1</td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>					
						<td>%</td>
               		</tr>
               		<tr>
						<td>2</td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>					
						<td>%</td>
               		</tr>
				</table>
	         	</c:if>
	         	</textarea></td>
			</tr>
			<tr>
				<th>
					<label><font color="red">*</font>总工时：</label>
				</th>
	         	<td colspan="4"><input maxlength="5" type="text" id="nextWeekTotalHours" name="nextWeekTotalHours" class="number required" value="${model.nextWeekTotalHours}" style="display: inline;width: 20%">小时</td>
			</tr>
	    </table>
	    <div class="taCenter">
			<input class="button" type="submit" value="提交"/>
		   	<input class="button default" type="reset" value="重置"/>
		</div>
   </div>
</form>
<script>
	function thisWeek(){
		$(".cg_thisWeek").attr("class","cg_thisWeek current cur ");
		$(".cg_nextWeek").attr("class","cg_nextWeek");
		$(".table2").hide();
		$(".table1").show();
	}
	function nextWeek(){
        $(".cg_nextWeek").attr("class","cg_nextWeek current cur ");
		$(".cg_thisWeek").attr("class","cg_thisWeek");
        $(".taCenter").show();
        $(".table1").hide();
		$(".table2").show();
	}
</script>
</shield:permssion>